package com.loongxun.playwithyou.bean;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/7/19.
 */
public class SendRequest{

    public String phone;
    public String code;
    public String sessionId;
    public String userId;
    public String password;
    public String memberSex;
    public int pageNo;
    public String memberId;
    public String orderNo;
    public String memberGameId;//游戏id
    public String hoursNum;//陪玩时长
    public String userPhone;//手机号
    public String merchantId;//地址id
    public String playStartTime;//预约时间
    public String statisId;//结算id
//    public String openid;
    public String unionid;//微信唯一凭证
    public String nickname;//昵称
    public String headimgurl;//头像
    public String orderState;//订单状态
    public String evaluateInfo;//评价
    public String orderRefund;//订单取消原因
    public String orderId;//订单ID
    public String oldPassword;
    public String newPassword;
    public String conNewPassword;
    public String findType;//0自动匹配，1手动选择

    //首页列表
    public JSONObject toIndexListJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("memberSex", memberSex);
        return localItemObject;
    }

    //陪玩人员详情
    public JSONObject toMemberInfoJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("memberId", memberId);
        return localItemObject;
    }

    //删除收藏
    public JSONObject toDelCollJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("memberId", memberId);
        localItemObject.put("userId", userId);
        return localItemObject;
    }

    //获取手机验证码
    public JSONObject toSignupPhoneJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("phone", phone);
        return localItemObject;
    }

    //注册
    public JSONObject toSignupJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("phone", phone);
        localItemObject.put("sessionId", sessionId);
        localItemObject.put("code", code);
        localItemObject.put("password", password);
        return localItemObject;
    }

    //登录
    public JSONObject toSigninJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("phone", phone);
        localItemObject.put("password", password);
        return localItemObject;
    }

    //微信登录保存
    public JSONObject toWxLoginJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
//        localItemObject.put("openid", openid);
        localItemObject.put("unionid",unionid);
        localItemObject.put("nickname", nickname);
        localItemObject.put("headimgurl", headimgurl);
        return localItemObject;
    }

    //绑定手机号
    public JSONObject bindPhoneJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("phone", phone);
        localItemObject.put("sessionId", sessionId);
        localItemObject.put("code", code);
        localItemObject.put("userId", userId);
        return localItemObject;
    }

    //修改密码
    public JSONObject updatePassJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("userId", userId);
        localItemObject.put("oldPassword", oldPassword);
        localItemObject.put("newPassword", newPassword);
        localItemObject.put("conNewPassword", conNewPassword);
        return localItemObject;
    }

    //保存订单
    //{"memberGameId":"38","userId":"39","hoursNum":"1","userPhone":"15092710472","merchantId":"1","playStartTime":"2017-07-09 08:00"}
    public JSONObject toSaveOrderJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("memberGameId", memberGameId);
        localItemObject.put("userId", userId);
        localItemObject.put("hoursNum", hoursNum);
        localItemObject.put("userPhone", userPhone);
        localItemObject.put("merchantId", merchantId);
        localItemObject.put("playStartTime", playStartTime);
        return localItemObject;
    }

    //判断此会员是否为陪玩人员
    public JSONObject toisMemberJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("userId", userId);
        return localItemObject;
    }

    //订单列表
    public JSONObject toUserOrderListJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("pageNo", pageNo);
        localItemObject.put("userId", userId);
        localItemObject.put("orderState", orderState);
        return localItemObject;
    }

    //修改订单状态 orderState（取消订单传值=5，确认订单传值=2）
    public JSONObject toUpOrderJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("orderNo", orderNo);
        localItemObject.put("orderState", orderState);
        return localItemObject;
    }

    //保存评价
    public JSONObject tosaveEvaluateJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("orderNo", orderNo);
        localItemObject.put("orderId", orderId);
        localItemObject.put("evaluateInfo", evaluateInfo);
        return localItemObject;
    }

    //保存申请
    public JSONObject tosaveExamJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("orderId", orderId);
        localItemObject.put("orderRefund", orderRefund);
        return localItemObject;
    }

    //陪玩人员订单列表
    public JSONObject toOrderMemberJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("pageNo", pageNo);
        localItemObject.put("memberId", memberId);
        return localItemObject;
    }

    //陪玩人员订单详情
    public JSONObject toOrderMemberInfoJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("orderNo", orderNo);
        return localItemObject;
    }

    //陪玩人员结算明细列表
    public JSONObject toBillInfoListJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("statisId", statisId);
        return localItemObject;
    }

    //陪玩人员结算明细详情
    public JSONObject toBillInfoJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("statisId", statisId);
        localItemObject.put("orderNo", orderNo);
        return localItemObject;
    }

    //预约
    public JSONObject tofindSuiMemberJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("findType", findType);
        localItemObject.put("playStartTime", playStartTime);
        localItemObject.put("hoursNum", hoursNum);
        return localItemObject;
    }

    //下单
    public JSONObject tofindSaveOrderJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("userId", userId);
        localItemObject.put("memberId", memberId);
        localItemObject.put("playStartTime", playStartTime);
        localItemObject.put("hoursNum", hoursNum);
        return localItemObject;
    }

    //拉黑
    public JSONObject tofindShieldingJson() throws JSONException {
        JSONObject localItemObject = new JSONObject();
        localItemObject.put("userId", userId);
        localItemObject.put("memberId", memberId);
        return localItemObject;
    }

}
